package db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class getDBConnection {
    public static Connection getConnection(){
        Connection conn=null;
        try {
            Class.forName(ConfigDB.URL);
            conn= DriverManager.getConnection(ConfigDB.ConnectURL,ConfigDB.DBUSER,ConfigDB.DBPASS);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(getDBConnection.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(getDBConnection.class.getName()).log(Level.SEVERE, null, ex);
        }
        return conn;
    }
}
